﻿using System;

public class RandomDropItemOnDie : RandomDropItem
{
    public Life health;

    private void Start()
    {
        if (this.health == null)
        {
            this.health = base.GetComponentInChildren<Life>();
        }
        if (this.health != null)
        {
            this.health.onDie += delegate {
                base.enabled = true;
                this.DoInstantiate();
            };
        }
    }
}

